(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

cond(true, x) → cond(and(even(x), gr(x, 0)), p(x))
and(x, false) → false
and(false, x) → false
and(true, true) → true
even(0) → true
even(s(0)) → false
even(s(s(x))) → even(x)
gr(0, x) → false
gr(s(x), 0) → true
gr(s(x), s(y)) → gr(x, y)
p(0) → 0
p(s(x)) → x

Rewrite Strategy: INNERMOST

(1) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

cond(true, x) → cond(and(even(x), gr(x, 0)), p(x)) [1]
and(x, false) → false [1]
and(false, x) → false [1]
and(true, true) → true [1]
even(0) → true [1]
even(s(0)) → false [1]
even(s(s(x))) → even(x) [1]
gr(0, x) → false [1]
gr(s(x), 0) → true [1]
gr(s(x), s(y)) → gr(x, y) [1]
p(0) → 0 [1]
p(s(x)) → x [1]

Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

cond(true, x) → cond(and(even(x), gr(x, 0)), p(x)) [1]
and(x, false) → false [1]
and(false, x) → false [1]
and(true, true) → true [1]
even(0) → true [1]
even(s(0)) → false [1]
even(s(s(x))) → even(x) [1]
gr(0, x) → false [1]
gr(s(x), 0) → true [1]
gr(s(x), s(y)) → gr(x, y) [1]
p(0) → 0 [1]
p(s(x)) → x [1]

The TRS has the following type information:
cond :: true:false → 0:s:y → cond
true :: true:false
and :: true:false → true:false → true:false
even :: 0:s:y → true:false
gr :: 0:s:y → 0:s:y → true:false
0 :: 0:s:y
p :: 0:s:y → 0:s:y
false :: true:false
s :: 0:s:y → 0:s:y
y :: 0:s:y

Rewrite Strategy: INNERMOST

(5) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


cond

(c) The following functions are completely defined:

and
even
gr
p

Due to the following rules being added:

even(v0) → null_even [0]
gr(v0, v1) → null_gr [0]
p(v0) → null_p [0]
and(v0, v1) → null_and [0]

And the following fresh constants:

null_even, null_gr, null_p, null_and, const

(6) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

cond(true, x) → cond(and(even(x), gr(x, 0)), p(x)) [1]
and(x, false) → false [1]
and(false, x) → false [1]
and(true, true) → true [1]
even(0) → true [1]
even(s(0)) → false [1]
even(s(s(x))) → even(x) [1]
gr(0, x) → false [1]
gr(s(x), 0) → true [1]
gr(s(x), s(y)) → gr(x, y) [1]
p(0) → 0 [1]
p(s(x)) → x [1]
even(v0) → null_even [0]
gr(v0, v1) → null_gr [0]
p(v0) → null_p [0]
and(v0, v1) → null_and [0]

The TRS has the following type information:
cond :: true:false:null_even:null_gr:null_and → 0:s:y:null_p → cond
true :: true:false:null_even:null_gr:null_and
and :: true:false:null_even:null_gr:null_and → true:false:null_even:null_gr:null_and → true:false:null_even:null_gr:null_and
even :: 0:s:y:null_p → true:false:null_even:null_gr:null_and
gr :: 0:s:y:null_p → 0:s:y:null_p → true:false:null_even:null_gr:null_and
0 :: 0:s:y:null_p
p :: 0:s:y:null_p → 0:s:y:null_p
false :: true:false:null_even:null_gr:null_and
s :: 0:s:y:null_p → 0:s:y:null_p
y :: 0:s:y:null_p
null_even :: true:false:null_even:null_gr:null_and
null_gr :: true:false:null_even:null_gr:null_and
null_p :: 0:s:y:null_p
null_and :: true:false:null_even:null_gr:null_and
const :: cond

Rewrite Strategy: INNERMOST

(7) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

cond(true, 0) → cond(and(true, false), 0) [4]
cond(true, 0) → cond(and(true, false), null_p) [3]
cond(true, 0) → cond(and(true, null_gr), 0) [3]
cond(true, 0) → cond(and(true, null_gr), null_p) [2]
cond(true, s(0)) → cond(and(false, true), 0) [4]
cond(true, s(0)) → cond(and(false, true), null_p) [3]
cond(true, s(0)) → cond(and(false, null_gr), 0) [3]
cond(true, s(0)) → cond(and(false, null_gr), null_p) [2]
cond(true, s(s(x'))) → cond(and(even(x'), true), s(x')) [4]
cond(true, s(s(x'))) → cond(and(even(x'), true), null_p) [3]
cond(true, s(s(x'))) → cond(and(even(x'), null_gr), s(x')) [3]
cond(true, s(s(x'))) → cond(and(even(x'), null_gr), null_p) [2]
cond(true, 0) → cond(and(null_even, false), 0) [3]
cond(true, 0) → cond(and(null_even, false), null_p) [2]
cond(true, s(x'')) → cond(and(null_even, true), x'') [3]
cond(true, s(x'')) → cond(and(null_even, true), null_p) [2]
cond(true, 0) → cond(and(null_even, null_gr), 0) [2]
cond(true, s(x1)) → cond(and(null_even, null_gr), x1) [2]
cond(true, x) → cond(and(null_even, null_gr), null_p) [1]
and(x, false) → false [1]
and(false, x) → false [1]
and(true, true) → true [1]
even(0) → true [1]
even(s(0)) → false [1]
even(s(s(x))) → even(x) [1]
gr(0, x) → false [1]
gr(s(x), 0) → true [1]
gr(s(x), s(y)) → gr(x, y) [1]
p(0) → 0 [1]
p(s(x)) → x [1]
even(v0) → null_even [0]
gr(v0, v1) → null_gr [0]
p(v0) → null_p [0]
and(v0, v1) → null_and [0]

The TRS has the following type information:
cond :: true:false:null_even:null_gr:null_and → 0:s:y:null_p → cond
true :: true:false:null_even:null_gr:null_and
and :: true:false:null_even:null_gr:null_and → true:false:null_even:null_gr:null_and → true:false:null_even:null_gr:null_and
even :: 0:s:y:null_p → true:false:null_even:null_gr:null_and
gr :: 0:s:y:null_p → 0:s:y:null_p → true:false:null_even:null_gr:null_and
0 :: 0:s:y:null_p
p :: 0:s:y:null_p → 0:s:y:null_p
false :: true:false:null_even:null_gr:null_and
s :: 0:s:y:null_p → 0:s:y:null_p
y :: 0:s:y:null_p
null_even :: true:false:null_even:null_gr:null_and
null_gr :: true:false:null_even:null_gr:null_and
null_p :: 0:s:y:null_p
null_and :: true:false:null_even:null_gr:null_and
const :: cond

Rewrite Strategy: INNERMOST

(9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

true => 2
0 => 0
false => 1
y => 1
null_even => 0
null_gr => 0
null_p => 0
null_and => 0
const => 0

(10) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: x >= 0, z' = 1, z = x
and(z, z') -{ 1 }→ 1 :|: z' = x, z = 1, x >= 0
and(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
cond(z, z') -{ 3 }→ cond(and(even(x'), 2), 0) :|: z = 2, z' = 1 + (1 + x'), x' >= 0
cond(z, z') -{ 4 }→ cond(and(even(x'), 2), 1 + x') :|: z = 2, z' = 1 + (1 + x'), x' >= 0
cond(z, z') -{ 2 }→ cond(and(even(x'), 0), 0) :|: z = 2, z' = 1 + (1 + x'), x' >= 0
cond(z, z') -{ 3 }→ cond(and(even(x'), 0), 1 + x') :|: z = 2, z' = 1 + (1 + x'), x' >= 0
cond(z, z') -{ 4 }→ cond(and(2, 1), 0) :|: z = 2, z' = 0
cond(z, z') -{ 3 }→ cond(and(2, 1), 0) :|: z = 2, z' = 0
cond(z, z') -{ 3 }→ cond(and(2, 0), 0) :|: z = 2, z' = 0
cond(z, z') -{ 2 }→ cond(and(2, 0), 0) :|: z = 2, z' = 0
cond(z, z') -{ 4 }→ cond(and(1, 2), 0) :|: z = 2, z' = 1 + 0
cond(z, z') -{ 3 }→ cond(and(1, 2), 0) :|: z = 2, z' = 1 + 0
cond(z, z') -{ 3 }→ cond(and(1, 0), 0) :|: z = 2, z' = 1 + 0
cond(z, z') -{ 2 }→ cond(and(1, 0), 0) :|: z = 2, z' = 1 + 0
cond(z, z') -{ 3 }→ cond(and(0, 2), x'') :|: z = 2, z' = 1 + x'', x'' >= 0
cond(z, z') -{ 2 }→ cond(and(0, 2), 0) :|: z = 2, z' = 1 + x'', x'' >= 0
cond(z, z') -{ 3 }→ cond(and(0, 1), 0) :|: z = 2, z' = 0
cond(z, z') -{ 2 }→ cond(and(0, 1), 0) :|: z = 2, z' = 0
cond(z, z') -{ 2 }→ cond(and(0, 0), x1) :|: z = 2, x1 >= 0, z' = 1 + x1
cond(z, z') -{ 2 }→ cond(and(0, 0), 0) :|: z = 2, z' = 0
cond(z, z') -{ 1 }→ cond(and(0, 0), 0) :|: z = 2, z' = x, x >= 0
even(z) -{ 1 }→ even(x) :|: x >= 0, z = 1 + (1 + x)
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
gr(z, z') -{ 1 }→ gr(x, 1) :|: z' = 1 + 1, x >= 0, z = 1 + x
gr(z, z') -{ 1 }→ 2 :|: x >= 0, z = 1 + x, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' = x, x >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
p(z) -{ 1 }→ x :|: x >= 0, z = 1 + x
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0

(11) InliningProof (UPPER BOUND(ID) transformation)

Inlined the following terminating rules on right-hand sides where appropriate:

and(z, z') -{ 1 }→ 1 :|: x >= 0, z' = 1, z = x
and(z, z') -{ 1 }→ 1 :|: z' = x, z = 1, x >= 0
and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1

(12) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: x >= 0, z' = 1, z = x
and(z, z') -{ 1 }→ 1 :|: z' = x, z = 1, x >= 0
and(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
cond(z, z') -{ 3 }→ cond(and(even(x'), 2), 0) :|: z = 2, z' = 1 + (1 + x'), x' >= 0
cond(z, z') -{ 4 }→ cond(and(even(x'), 2), 1 + x') :|: z = 2, z' = 1 + (1 + x'), x' >= 0
cond(z, z') -{ 2 }→ cond(and(even(x'), 0), 0) :|: z = 2, z' = 1 + (1 + x'), x' >= 0
cond(z, z') -{ 3 }→ cond(and(even(x'), 0), 1 + x') :|: z = 2, z' = 1 + (1 + x'), x' >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(0, x'') :|: z = 2, z' = 1 + x'', x'' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, x1) :|: z = 2, x1 >= 0, z' = 1 + x1, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + x'', x'' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' = x, x >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(x) :|: x >= 0, z = 1 + (1 + x)
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
gr(z, z') -{ 1 }→ gr(x, 1) :|: z' = 1 + 1, x >= 0, z = 1 + x
gr(z, z') -{ 1 }→ 2 :|: x >= 0, z = 1 + x, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' = x, x >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
p(z) -{ 1 }→ x :|: x >= 0, z = 1 + x
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0

(13) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(14) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 1 }→ gr(z - 1, 1) :|: z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

(15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ and }
{ p }
{ gr }
{ even }
{ cond }

(16) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 1 }→ gr(z - 1, 1) :|: z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {and}, {p}, {gr}, {even}, {cond}

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: and
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(18) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 1 }→ gr(z - 1, 1) :|: z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {and}, {p}, {gr}, {even}, {cond}
Previous analysis results are:
and: runtime: ?, size: O(1) [2]

(19) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: and
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(20) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 1 }→ gr(z - 1, 1) :|: z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {p}, {gr}, {even}, {cond}
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]

(21) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(22) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 1 }→ gr(z - 1, 1) :|: z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {p}, {gr}, {even}, {cond}
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]

(23) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: p
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(24) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 1 }→ gr(z - 1, 1) :|: z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {p}, {gr}, {even}, {cond}
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]
p: runtime: ?, size: O(n1) [z]

(25) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: p
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(26) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 1 }→ gr(z - 1, 1) :|: z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {gr}, {even}, {cond}
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]
p: runtime: O(1) [1], size: O(n1) [z]

(27) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(28) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 1 }→ gr(z - 1, 1) :|: z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {gr}, {even}, {cond}
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]
p: runtime: O(1) [1], size: O(n1) [z]

(29) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: gr
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(30) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 1 }→ gr(z - 1, 1) :|: z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {gr}, {even}, {cond}
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]
p: runtime: O(1) [1], size: O(n1) [z]
gr: runtime: ?, size: O(1) [2]

(31) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: gr
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(32) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 1 }→ gr(z - 1, 1) :|: z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {even}, {cond}
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]
p: runtime: O(1) [1], size: O(n1) [z]
gr: runtime: O(1) [2], size: O(1) [2]

(33) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(34) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 3 }→ s :|: s >= 0, s <= 2, z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {even}, {cond}
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]
p: runtime: O(1) [1], size: O(n1) [z]
gr: runtime: O(1) [2], size: O(1) [2]

(35) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: even
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(36) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 3 }→ s :|: s >= 0, s <= 2, z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {even}, {cond}
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]
p: runtime: O(1) [1], size: O(n1) [z]
gr: runtime: O(1) [2], size: O(1) [2]
even: runtime: ?, size: O(1) [2]

(37) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using PUBS for: even
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z

(38) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 2), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 4 }→ cond(and(even(z' - 2), 2), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 2 }→ cond(and(even(z' - 2), 0), 0) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 3 }→ cond(and(even(z' - 2), 0), 1 + (z' - 2)) :|: z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ 1 }→ even(z - 2) :|: z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 3 }→ s :|: s >= 0, s <= 2, z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {cond}
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]
p: runtime: O(1) [1], size: O(n1) [z]
gr: runtime: O(1) [2], size: O(1) [2]
even: runtime: O(n1) [1 + z], size: O(1) [2]

(39) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(40) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 4 + z' }→ cond(s1, 1 + (z' - 2)) :|: s'' >= 0, s'' <= 2, s1 >= 0, s1 <= 2, z = 2, z' - 2 >= 0
cond(z, z') -{ 3 + z' }→ cond(s3, 0) :|: s2 >= 0, s2 <= 2, s3 >= 0, s3 <= 2, z = 2, z' - 2 >= 0
cond(z, z') -{ 3 + z' }→ cond(s5, 1 + (z' - 2)) :|: s4 >= 0, s4 <= 2, s5 >= 0, s5 <= 2, z = 2, z' - 2 >= 0
cond(z, z') -{ 2 + z' }→ cond(s7, 0) :|: s6 >= 0, s6 <= 2, s7 >= 0, s7 <= 2, z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ z }→ s' :|: s' >= 0, s' <= 2, z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 3 }→ s :|: s >= 0, s <= 2, z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {cond}
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]
p: runtime: O(1) [1], size: O(n1) [z]
gr: runtime: O(1) [2], size: O(1) [2]
even: runtime: O(n1) [1 + z], size: O(1) [2]

(41) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: cond
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(42) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 4 + z' }→ cond(s1, 1 + (z' - 2)) :|: s'' >= 0, s'' <= 2, s1 >= 0, s1 <= 2, z = 2, z' - 2 >= 0
cond(z, z') -{ 3 + z' }→ cond(s3, 0) :|: s2 >= 0, s2 <= 2, s3 >= 0, s3 <= 2, z = 2, z' - 2 >= 0
cond(z, z') -{ 3 + z' }→ cond(s5, 1 + (z' - 2)) :|: s4 >= 0, s4 <= 2, s5 >= 0, s5 <= 2, z = 2, z' - 2 >= 0
cond(z, z') -{ 2 + z' }→ cond(s7, 0) :|: s6 >= 0, s6 <= 2, s7 >= 0, s7 <= 2, z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ z }→ s' :|: s' >= 0, s' <= 2, z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 3 }→ s :|: s >= 0, s <= 2, z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed: {cond}
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]
p: runtime: O(1) [1], size: O(n1) [z]
gr: runtime: O(1) [2], size: O(1) [2]
even: runtime: O(n1) [1 + z], size: O(1) [2]
cond: runtime: ?, size: O(1) [0]

(43) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: cond
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 17 + 7·z' + z'2

(44) Obligation:

Complexity RNTS consisting of the following rules:

and(z, z') -{ 1 }→ 2 :|: z = 2, z' = 2
and(z, z') -{ 1 }→ 1 :|: z >= 0, z' = 1
and(z, z') -{ 1 }→ 1 :|: z = 1, z' >= 0
and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
cond(z, z') -{ 4 + z' }→ cond(s1, 1 + (z' - 2)) :|: s'' >= 0, s'' <= 2, s1 >= 0, s1 <= 2, z = 2, z' - 2 >= 0
cond(z, z') -{ 3 + z' }→ cond(s3, 0) :|: s2 >= 0, s2 <= 2, s3 >= 0, s3 <= 2, z = 2, z' - 2 >= 0
cond(z, z') -{ 3 + z' }→ cond(s5, 1 + (z' - 2)) :|: s4 >= 0, s4 <= 2, s5 >= 0, s5 <= 2, z = 2, z' - 2 >= 0
cond(z, z') -{ 2 + z' }→ cond(s7, 0) :|: s6 >= 0, s6 <= 2, s7 >= 0, s7 <= 2, z = 2, z' - 2 >= 0
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 2 = x
cond(z, z') -{ 5 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 2 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 1 + 0, 0 = x, 1 = 1, x >= 0
cond(z, z') -{ 4 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 3 }→ cond(1, 0) :|: z = 2, z' = 0, x >= 0, 1 = 1, 0 = x
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 1 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 2 = v0, 0 = v1
cond(z, z') -{ 4 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 2 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 1 + 0, v0 >= 0, v1 >= 0, 1 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 1 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, 0) :|: z = 2, z' = 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 1 }→ cond(0, 0) :|: z = 2, z' >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
cond(z, z') -{ 3 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 2 = v1
cond(z, z') -{ 2 }→ cond(0, z' - 1) :|: z = 2, z' - 1 >= 0, v0 >= 0, v1 >= 0, 0 = v0, 0 = v1
even(z) -{ z }→ s' :|: s' >= 0, s' <= 2, z - 2 >= 0
even(z) -{ 1 }→ 2 :|: z = 0
even(z) -{ 1 }→ 1 :|: z = 1 + 0
even(z) -{ 0 }→ 0 :|: z >= 0
gr(z, z') -{ 3 }→ s :|: s >= 0, s <= 2, z' = 1 + 1, z - 1 >= 0
gr(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0
gr(z, z') -{ 1 }→ 1 :|: z' >= 0, z = 0
gr(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
p(z) -{ 1 }→ 0 :|: z = 0
p(z) -{ 0 }→ 0 :|: z >= 0
p(z) -{ 1 }→ z - 1 :|: z - 1 >= 0

Function symbols to be analyzed:
Previous analysis results are:
and: runtime: O(1) [1], size: O(1) [2]
p: runtime: O(1) [1], size: O(n1) [z]
gr: runtime: O(1) [2], size: O(1) [2]
even: runtime: O(n1) [1 + z], size: O(1) [2]
cond: runtime: O(n2) [17 + 7·z' + z'2], size: O(1) [0]

(45) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(46) BOUNDS(1, n^2)